package com.sj.增删改查结点;

/**
 * @author sj
 * @date 2021/5/3
 **/
public class 找中点 {
    public static LinkNode findMid(LinkNode head){
        if (head == null || head.next == null)return null;
        if (head.next.next == null) return head;
        LinkNode low = head;
        LinkNode fast = head;
        while (fast.next != null && fast.next.next != null){
            low = low.next;
            fast = fast.next.next;
        }
          return low;

    }


}
